# _*_ coding: utf-8 _*_
from odoo import models, fields, api


class PurchaseRequisitionLine(models.Model):
    _inherit = "purchase.requisition.line"

    state = fields.Selection([
        ("draft", "Draft"),
        ("confirm", "Confirm"),
        ("assign", "Assign"),
        ("pricing", "Pricing"),
        ("done", "Done"),
        ("cancel", "Cancel"),
    ], default="draft")

    def action_confirm(self):
        self.write({
            "state": "confirm"
        })

    def action_cancel(self):
        self.write({
            "state": "cancel"
        })
